<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html>
<html>
   <head>
    	<title></title>   
		<s:include value="../common/source.jsp"></s:include>	
		<script src="js/member.js"></script>
		
  </head>
  <body>

        <div class="body">
          <div class="content ui-sortable">
          <div class="list">
          	项目列表
          	 </div>
 </div>
<br>
 <div class="load0">
 <form action="teacher/excelPro.action" method="post">
        <input type="hidden" name="name" value=${name }>
        <input type="hidden" name="flag" value=${flag }>
        <input type="hidden" name="date1" value=${date11 }>
        <input type="hidden" name="date2" value=${date22 }>
        <input type="submit" class="sui-btn btn-primary" value="下载Excel">
        </form> 
    </div>
          <!--关键词搜索-->
           <div class="search">
            <form action="teacher/searchPro.action" method="post">
           
              <label class="control-label v-top">输入关键词：</label>
             <input type="text"  class="sear" name="vague" > 
              <button type="submit" class="sui-btn btn-primary">搜索</button>
         
            </form> 
              </div>
            <!--关键词搜索结束-->
       <!--按年份搜索开始-->    
       <div class="year">           
  	  <form action="teacher/searchProTime.action" method="post">
         <span class="control-group">
          <label class="control-label v-top">开始年份：</label>
          <span class="controls">
            <input type="text" class="sear" data-toggle="datepicker" name="date1">
          </span>
        </span>
            <span class="control-group">
          <label class="control-label v-top" >结束年份：</label>
          <span class="controls">
             <input type="text" class="sear" data-toggle="datepicker" name="date2">
          </span>
        </span> <button type="submit" class="sui-btn btn-primary">搜索</button>
        </form> 
          </div>
           <!-- <div class="nopath">
           <form action="admin/SearchAwardUncheckAction.action?currentPage=1" method="post">
           <button type="submit" class=" sui-btn ">未审核项</button>
           </form>
           </div> -->
           <br>	
            <hr style="background-color:#cfe1f9;height:1px;"/>   
		        <!-- 打印报表 -->
       
  <table class="sui-table table-primary table-sideheader">
          <thead>
            <tr>
             <th style="width:4%;text-align:center">序号</th>
              <th style="width:24%">项目名称</th>       
              <th style="width:7%">类型</th>                  
              <th style="width:9%">来源</th>
              <th style="width:6%">经费(万)</th>
              <th style="width:6%">负责人</th>
              <th style="width:7%">通信人员</th>       
              <th style="width:8%">开始日期</th>
              <th style="width:8%">截止日期</th>
              <th style="width:8%">审核状态</th>
              <th style="width:5%">下载</th>
            <th style="width:4%">操作</th>
            <th style="width:4%">流程</th>
            </tr>
          </thead>
          <tbody>

          <s:iterator value="projects">
            <tr>
              <td style="text-align:center"></td>
              <td><a href="admin/ReMendProjectAction.action?project.proId=<s:property value="proId"/>"><s:property value="name"/></a></td>
              <td>
              <s:if test="kind==0">纵向</s:if>
              <s:else>横向</s:else>
              </td>
              <td><s:property value="source"/></td>
              <td><s:property value="funds"/></td>
              <td><s:property value="leader"/></td>
              <td><s:property value="communicate"/></td>
              <td><s:date name="beginDate"  format="yyyy-MM-dd" /></td>
              <td><s:date name="finishDate"  format="yyyy-MM-dd" /></td>
          <td>  
               <s:if test="state==0">未审核</s:if>
               <s:elseif test="state==1"><span style="color:red">被驳回</span></s:elseif>
               <s:elseif test="state==5"><span style="color:green">审核通过</span></s:elseif>
               <s:else><span style="color:blue">审核中</span></s:else>
              </td>
         <td><a href="teacher/down.action?nameCom=<s:property value="upload"/>">下载</a></td>   
              <td>
              <s:if test="state==0">
              <form action="teacher/deletePro.action?projectid=<s:property value="proId"/>" onsubmit="return firm()" method="post">
           <button type="submit">删除</button>
           </form>
              </s:if>
              <s:elseif test="state==1">
               <form action="teacher/deletePro.action?projectid=<s:property value="proId"/>" onsubmit="return firm()" method="post">
           <button type="submit">删除</button>
           </form>
              </s:elseif>
                 <s:else>删除</s:else>
             
              <s:if test="state==0">
                 <a href="teacher/modifyPro.action?projectId=<s:property value="proId"/>">修改</a>
                 </s:if>
                 <s:elseif test="state==1">
                 <a href="teacher/modifyPro.action?projectId=<s:property value="proId"/>">修改重传</a>
                 </s:elseif></td>
                  <td><a href="teacher/flowPro.action?projectId=<s:property value="proId"/>">查看</a></td>
              </tr>
          </s:iterator>
          </tbody>
        </table>
        <div align="center" style="font-size: 12px">
         <s:if test="#request.page.totalCount==0">                            
                               对不起，你所查找的数据条数为0！
                               </s:if>
							<s:if test="#request.page.hasPrePage">
							    <s:if test="#request.flag==1">
							    <a href="teacher/searchProTime.action?currentPage=1&&date1=${date111 }&&date2=${date222 }">首页</a> | 
								<a href="teacher/searchProTime.action?currentPage=${page.currentPage -1 }&&date1=${date111 }&&date2=${date222 }">上一页</a>
							    </s:if>
							    <s:elseif test="#request.flag==2" >
							     <a href="teacher/searchPro.action?currentPage=1&&vague=${name11 }&&method=get">首页</a> | 
								<a href="teacher/searchPro.action?currentPage=${page.currentPage -1 }&&vague=${name11 }&&method=get">上一页</a>
							    </s:elseif >
							    <s:else>
								<a href="teacher/listPro.action?currentPage=1">首页</a> | 
								<a href="teacher/listPro.action?currentPage=${page.currentPage -1 }">上一页</a>
							    </s:else>
							</s:if>
							<s:else>
							
							</s:else>
							<s:if test="#request.page.hasNextPage">
							    <s:if test="#request.flag==1">
								<a href="teacher/searchProTime.action?currentPage=${page.currentPage + 1 }&&date1=${date111 }&&date2=${date222 }">下一页</a> | 
								<a href="teacher/searchProTime.action?currentPage=${page.totalPage }&&date1=${date111 }&&date2=${date222 }">尾页</a>
								</s:if>
								<s:elseif test="#request.flag==2">
								<a href="teacher/searchPro.action?currentPage=${page.currentPage + 1 }&&vague=${name11 }&&method=get">下一页</a> | 
								<a href="teacher/searchPro.action?currentPage=${page.totalPage }&&vague=${name11 }&&method=get">尾页</a>
								</s:elseif>
							    <s:else>
								<a href="teacher/listPro.action?currentPage=${page.currentPage + 1 }">下一页</a> | 
								<a href="teacher/listPro.action?currentPage=${page.totalPage }">尾页</a>
								</s:else>
							</s:if>
							<s:else>
								
							</s:else>
						</div>	
</div>
  </body>
  <script>
if("<s:property value="suc"/>"=="success"){
alert("删除成功！！！");
}else if("<s:property value="suc"/>"=="success2"){
 alert("内容修改成功！！！");
 }
  </script>
  <!-- ****************日期显示******************** -->
        <script type="text/javascript">

	    var d = new Date();
		var date = d.getFullYear();
		var uu=document.getElementById("menu4");
		var tt=document.getElementById("menu6");
		var aa=uu.getElementsByTagName("a");
		var bb=tt.getElementsByTagName("a");
		
		   for(var i=0; i<aa.length;i++) 
		   {
		   	aa[i].innerHTML=date;
		   	//aa[i].value=date;a
		   	aa[i].setAttribute('value', date);
		   	date--;
		   } 
		   var date = d.getFullYear();
		   for(var i=0; i<bb.length;i++) 
		   {
		   	bb[i].innerHTML=date;
		   	bb[i].setAttribute('value',date);
		   	date--;
		   	aa[i].value=date;
		   } 
        
        </script>
</html>

            

